﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//​​数据库连接字符串管理类
namespace WorkshopModule.Services {
    //通过 ConfigurationManager 从 App.config 中获取名为 SqlServerConnection 的数据库连接字符串
    [Obsolete("暂时不用")]
    public class DatabaseService {
        public string _connectionString { get; } // 公共只读属性
        public DatabaseService() {
            // 从配置文件中读取连接字符串
            var config = ConfigurationManager.ConnectionStrings["SqlServerConnection"];
            if (config == null) throw new InvalidOperationException("未配置数据库连接字符串");
            _connectionString = config.ConnectionString;
            try {

            } catch (Exception) {

            } finally {

            }
        }
    }
}
